home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / dev / amos / AMOSL0495.lzh / AMOSLIST / 000042_amos-request@svcs1.digex.net_Sat Apr 8 14:16:04 1995.msg < prev    next >
Internet Message Format  |  1995-05-01  |  2KB

  1. Received: from svcs1.digex.net by nfs2.digex.net with SMTP id AA13706
  2.   (5.67b8/IDA-1.5); Sat, 8 Apr 1995 14:16:03 -0400
  3. Received: by svcs1.digex.net id AA11000
  4.   (5.67b8/IDA-1.5 for amos-out); Sat, 8 Apr 1995 11:04:01 -0400
  5. Received: from nfs1.digex.net by svcs1.digex.net with SMTP id AA10996
  6.   (5.67b8/IDA-1.5 for <amos@svcs1.digex.net>); Sat, 8 Apr 1995 11:04:00 -0400
  7. Received: from seraph.uunet.ca (uunet.ca) by nfs1.digex.net with SMTP id AA10628
  8.   (5.67b8/IDA-1.5 for <amos-list@access.digex.net>); Sat, 8 Apr 1995 11:03:58 -0400
  9. Received: from portnoy.canrem.com ([198.133.42.17]) by mail.uunet.ca with SMTP id <202217-2>; Sat, 8 Apr 1995 11:05:10 -0400
  10. Received: from canrem.com by portnoy.canrem.com (4.1/SMI-4.1)
  11.     id AA11094; Sat, 8 Apr 95 11:00:19 EDT
  12. Received: by canrem.com (PCB-UUCP 1.1f)
  13.     id 1DA9F3; Sat,  8 Apr 95 10:57:49 -0500
  14. To: amos-list@access.digex.net
  15. Reply-To: CRSO.Amos@canrem.com
  16. Sender: CRSO.Amos@canrem.com
  17. Subject: Re: stdin/stdout
  18. From: mike.pelletier@canrem.com (Mike Pelletier)
  19. Message-Id: <60.2113.6587.0C1DA9F3@canrem.com>
  20. In-Reply-To: <9504081318.AA16686@goober.mbhs.edu>
  21. Date: Sat, 8 Apr 1995 11:54:00 -0400
  22. Organization: CRS Online  (Toronto, Ontario)
  23. Status: O
  24. X-Status: 
  25.  
  26. Your procedures were:
  27.  
  28. Procedure STDOUT[A$]
  29. FILE=Doscall(-60) : Rem Get stdout file handle
  30. If FILE : Rem Only do this if we have a stdout
  31. Dreg(1)=FILE
  32. Dreg(2)=Varptr(A$)
  33. Dreg(3)=Len(A$)
  34. DUMMY=Doscall(-48)
  35. End If
  36. End Proc
  37.  
  38. The stdout works fine
  39.  
  40. Procedure STDIN_CHAR
  41. FILE=Doscall(-54)
  42. If FILE
  43. C$=" "
  44. Dreg(1)=FILE
  45. Dreg(2)=Varptr(C$)
  46. Dreg(3)=1
  47. N=Doscall(-42)
  48. If N=0 : Rem Check for EOF
  49. C$=""
  50. End If
  51. Else
  52. C$=""
  53. End If
  54. End Proc[C$]
  55.  
  56. stdin char works ok the first time, then skips if called a second time in the
  57. program
  58.  
  59. Procedure STDIN_LINE
  60. FILE=Doscall(-54)
  61. If FILE
  62. A$=" "
  63. STDIN_CHAR : C$=Param$
  64. While C$<>Chr$(13) and Len(C$)>0 : Rem chr$(13)
  65. A$=A$+C$
  66. STDIN_CHAR : C$=Param$
  67. Wend
  68. Else
  69. A$=""
  70. End If
  71. End Proc[A$]
  72.  
  73. stdin line seems to work (but chr$(13) isn't the terminator that worked, I had
  74. to change it to chr$(10)) but the first charater is replaced by the second.
  75. "fred" shows up as "rred"
  76.  
  77. Well met and godspeed,
  78.                       Giark